/**
 * 
 */
package org.pfc.porlapatilla.DTO;

import java.util.Date;
import java.util.List;

import org.pfc.porlapatilla.model.Address;
import org.pfc.porlapatilla.model.Comment;

/**
 * The product information to send for products lists of Android app.
 * 
 * @author juan_antonio
 * 
 */
public class ProductDTO {

    /**
     * The product Id.
     */
    private String productId;

    /**
     * The product title.
     */
    private String title;

    /**
     * The product publication date.
     */
    private Date publicationDate;

    /**
     * The product status.
     */
    private String status;

    /**
     * The product address;
     */
    private Address address;

    /**
     * The product provider DTO.
     */
    private String providerNick;

    /**
     * The product description.
     */
    private String description;
    
    /**
     * The product subcategory
     */
    private String subcategory;
    
    /**
     * The product image
     */
    private boolean hasImage;

    /**
     * The product comment list.
     */
    private List<Comment> commentList;

    /**
     * Creates a new productDTO.
     */
    public ProductDTO() {
    }

    /**
     * Creates a new productDTO.
     * 
     * @param productId
     *            The new ProductDTO id.
     * @param title
     *            The new ProductDTO title.
     * @param publicationDate
     *            The new ProductDTO publication date.
     * @param status
     *            The new ProductDTO status.
     * @param address
     *            The new ProductDTO address.
     * @param providerNick
     *            The new ProductDTO provider nick.
     */
    public ProductDTO(String productId, String title, Date publicationDate,
	    String status, Address address, String providerNick, boolean hasImage) {
	this.productId = productId;
	this.title = title;
	this.publicationDate = publicationDate;
	this.status = status;
	this.address = address;
	this.providerNick = providerNick;
	this.hasImage = hasImage;
    }

    /**
     * Creates a new productDTO.
     * 
     * @param productId
     *            The new ProductDTO id.
     * @param title
     *            The new ProductDTO title.
     * @param publicationDate
     *            The new ProductDTO publication date.
     * @param status
     *            The new ProductDTO status.
     * @param address
     *            The new ProductDTO address
     * @param providerNick
     *            The new ProductDTO provider nick.
     * @param description
     *            The new ProductDTO description.
     * @param subcategory
     * 		  The new ProductDTO subcategory.
     * @param commentList
     *            The new ProductDTO comment list.
     */
    public ProductDTO(String productId, String title, Date publicationDate,
	    String status, Address address, String providerNick,
	    String description, String subcategory, boolean hasImage, List<Comment> commentList) {
	this.productId = productId;
	this.title = title;
	this.publicationDate = publicationDate;
	this.status = status;
	this.address = address;
	this.providerNick = providerNick;
	this.description = description;
	this.subcategory = subcategory;
	this.commentList = commentList;
	this.setHasImage(hasImage);
    }

    /**
     * @return the productId
     */
    public String getProductId() {
	return productId;
    }

    /**
     * @param productId
     *            the productId to set
     */
    public void setProductId(String productId) {
	this.productId = productId;
    }

    /**
     * @return the title
     */
    public String getTitle() {
	return title;
    }

    /**
     * @param title
     *            the title to set
     */
    public void setTitle(String title) {
	this.title = title;
    }

    /**
     * @return the publicationDate
     */
    public Date getPublicationDate() {
	return publicationDate;
    }

    /**
     * @param publicationDate
     *            the publicationDate to set
     */
    public void setPublicationDate(Date publicationDate) {
	this.publicationDate = publicationDate;
    }

    /**
     * @return the status
     */
    public String getStatus() {
	return status;
    }

    /**
     * @param status
     *            the status to set
     */
    public void setStatus(String status) {
	this.status = status;
    }

    /**
     * @return the address
     */
    public Address getAddress() {
	return address;
    }

    /**
     * @param address
     *            the address to set
     */
    public void setAddress(Address address) {
	this.address = address;
    }

    /**
     * @return the providerNick
     */
    public String getProviderNick() {
	return providerNick;
    }

    /**
     * @param providerNick
     *            the providerNick to set
     */
    public void setProviderNick(String providerNick) {
	this.providerNick = providerNick;
    }

    /**
     * @return the description
     */
    public String getDescription() {
	return description;
    }

    /**
     * @param description
     *            the description to set
     */
    public void setDescription(String description) {
	this.description = description;
    }

    /**
     * @return the subcategory
     */
    public String getSubcategory() {
        return subcategory;
    }

    /**
     * @param subcategory the subcategory to set
     */
    public void setSubcategory(String subcategory) {
        this.subcategory = subcategory;
    }

    /**
     * @return the hasImage
     */
    public boolean getHasImage() {
	return hasImage;
    }

    /**
     * @param hasImage the hasImage to set
     */
    public void setHasImage(boolean hasImage) {
	this.hasImage = hasImage;
    }

    /**
     * @return the commentList
     */
    public List<Comment> getCommentList() {
	return commentList;
    }

    /**
     * @param commentList
     *            the commentList to set
     */
    public void setCommentList(List<Comment> commentList) {
	this.commentList = commentList;
    }

}
